import { axios } from '@/utils/request'

// 分红池列表
export function poolList(parameter) {
  return axios({
    url: `/plat/plat-pool/list`,
    method: 'get',
    params: parameter,
  })
}
// 分红池详情
export function poolDetail(id) {
  return axios({
    url: `/plat/plat-pool/info&id=${id}`,
    method: 'get',
  })
}
// 添加、编辑 分红池
export function savePoolInfo(parameter) {
  return axios({
    url: `/plat/plat-pool/save`,
    method: 'post',
    data: parameter,
  })
}
// 删除 分红池
export function delPoolItem(id) {
  return axios({
    url: `/plat/plat-pool/delete&id=${id}`,
    method: 'get',
  })
}
// 总池统计
export function poolStatistic() {
  return axios({
    url: `/plat/plat-pool/statistic`,
    method: 'get',
  })
}
// 分红池明细表
export function poolLog(parameter) {
  return axios({
    url: `/plat/plat-pool-log/list`,
    method: 'get',
    params: parameter,
  })
}
// 分红池明细表 --用户
export function poolUserLog(parameter) {
  return axios({
    url: `/plat/plat-bonus-log/list`,
    method: 'get',
    params: parameter,
  })
}
// 分红池设置 -- 获取
export function getPoolSetting() {
  return axios({
    url: `/plat/plat-pool/pool-setting`,
    method: 'get',
  })
}
// 分红池设置 -- 保存
export function savePoolSetting(parameter) {
  return axios({
    url: `/plat/plat-pool/pool-setting`,
    method: 'post',
    data: parameter,
  })
}

/**
 * 分红池周期明细表
 * @param {*} parameter
 * @returns
 */
export function cycleListApi(parameter) {
  return axios({
    url: `/plat/plat-pool-log/cycle-list`,
    method: 'get',
    params: parameter,
  })
}
